Skip to content

ref(analytics): Transform analytics events for TET-825 #95205

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

constantinius
Copy link
Contributor

  • Transform event classes to use @analytics.eventclass decorator
  • Transform analytics.record calls to use event class instances
  • Update imports as needed

Closes TET-825

- Transform event classes to use @analytics.eventclass decorator
- Transform analytics.record calls to use event class instances
- Update imports as needed

Closes TET-825
@constantinius constantinius requested a review from a team as a code owner July 10, 2025 09:12
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jul 10, 2025
Copy link

codecov bot commented Jul 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #95205      +/-   ##
==========================================
+ Coverage   86.52%   87.84%   +1.31%     
==========================================
  Files       10478    10478              
  Lines      605960   605802     -158     
  Branches    23674    23641      -33     
==========================================
+ Hits       524303   532156    +7853     
+ Misses      81293    73286    -8007     
+ Partials      364      360       -4     

ArthurKnaus and others added 6 commits July 10, 2025 12:11
Not sure why the same logic returns a different result now that is not
in a hook anymore. However, the color ended up being white after moving
this to the theme and this PR fixes it.
Move the `OnboardingStep` type out of the `Step` component file as the
type is also used in other components and a general building block of
our docs structure.
Move `TabbedCodeSnippet` from `step.tsx` into
`onboardingCodeSnippet.tsx` since it is just a utility wrapper for it
and also is used in a multitude of places that do not use the `Step`
component.

- closes [TET-841: Move general onboarding doc types out of step
component
file](https://linear.app/getsentry/issue/TET-841/move-general-onboarding-doc-types-out-of-step-component-file)
The arcade for the profiling onboarding got blocked by our CSP.
This PR streamlines the embed URL to use the same format as the other
arcades.
@constantinius constantinius requested review from a team as code owners July 10, 2025 10:11
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 10, 2025
Copy link
Contributor

🚨 Warning: This pull request contains Frontend and Backend changes!

It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently.

Have questions? Please ask in the #discuss-dev-infra channel.

cursor[bot]

This comment was marked as outdated.

Comment on lines +7 to +8
project_id: str
event_id: str
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't these be ints?

Comment on lines +7 to +8
actor_id: str | None = None
id: str
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above - are these ints or str?

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Type Mismatch: Project ID Should Be Integer

The project_id field in GroupingParameterizationExperiment is typed as str but should be int. Sentry project IDs are consistently integers, aligning with other analytics events (e.g., EventUserSnubaQuery uses list[int] for project IDs). The event_id field is correctly typed as str. This project_id type mismatch will cause type checking errors and could lead to runtime issues or incorrect data recording.

src/sentry/analytics/events/grouping_parameterization_experiment.py#L6-L8

experiment_name: str
project_id: str
event_id: str

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants